package day05.localDate;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/25
 * 6.请问今天是今年的第多少天？
 */
public class Test6 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
        String today = sdf.format(calendar.getTime());
        int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR);
        System.out.println("今天是 " + today + "，是今年的第 " + dayOfYear + " 天");
    }
}
